package com.realdolmen.whiteyellowcross.model;

public class Personel {
	private String name;
	private String id;

	public Personel(String name) {
		super();
		this.name = name;
	}
	
	public Personel() {
		super();
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		String NEW_LINE = System.getProperty("line.separator");
		result.append(this.getClass().getName() + " Object {" + NEW_LINE);
		result.append(" Id: " + id + NEW_LINE);
		result.append(" Name: " + name + NEW_LINE);
		result.append("}");
		return result.toString();
	}

	@Override
	public boolean equals(Object obj) {
		return ((Personel)obj).getName().equalsIgnoreCase(this.name);
	}
	
	
}

